Skip to content

Fix #10198: Be robust against missing annotations #10212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

smarter
Copy link
Member

@smarter smarter commented Nov 6, 2020

In 6f32b62, I made sure the compiler could survive parsing a Java
classfile referring to annotations missing from the classpath, but we
could still run into trouble when a Scala unpickled class does the same.

Tweaking the Tasty unpickler to drop missing annotations would require
always forcing the symbols of all annotations which I would rather avoid
doing. Instead, we adopt the same solution as Scala 2 did in
sbt/zinc#701 and special-case the single place
where we force annotations of inherited members to ignore missing
annotations.

In 6f32b62, I made sure the compiler could survive parsing a Java
classfile referring to annotations missing from the classpath, but we
could still run into trouble when a Scala unpickled class does the same.

Tweaking the Tasty unpickler to drop missing annotations would require
always forcing the symbols of all annotations which I would rather avoid
doing. Instead, we adopt the same solution as Scala 2 did in
sbt/zinc#701 and special-case the single place
where we force annotations of inherited members to ignore missing
annotations.
@smarter
Copy link
Member Author

smarter commented Nov 16, 2020

Ping for review.

Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bishabosha bishabosha merged commit 64d9f1d into scala:master Nov 16, 2020
@bishabosha bishabosha deleted the inc-missing-annot branch November 16, 2020 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants